from random import Random

class Monster(list):
    """ Monster class
    """

    def __init__(self, name=None):
        """ init monster to position -1 -1 with name MonsterXXXX some random stuff
            the Name is the ID of the monster, so use unique names!!!

            there can be numbers generated that could be repeated, put in a function to check
            if that already exists or is a dupe of something already existing
        """

        # TODO TODO TODO fix possible collision
        mname = 'Monster'+ str(Random().randint(1111,9999))       
        if not name == None:
            mname = name

        # check if it's a dupe here, if dupe, regenerate or what... or check
        # on generation is possible too, throw exception if there's a dupe passed in!
        self.extend([mname, -1, -1])


# monster code is a stub, monsters will be extensible later with
# smart logic as to where it moves and how it swaps values

# >> monsters landing on a square that is still filled by a value may change it to something else

